﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace IA2MazeSolver
{
    public class MazeHelper
    {
        public static int[][] CopyData(Maze maze)
        {
            int[][] newData = new int[21][];

            for (int i = 0; i < maze.DrawWidth; i++)
            {
                for (int j = 0; j < maze.DrawHeight; j++)
                {
                    newData[i][j] = maze.Data[i][j];
                }
            }

            return newData;
        }

        public static Individuo StringToByte(String individuo)
        {
            char[] cec = individuo.ToCharArray();
            byte[] iByte = new byte[cec.Length];
            for (int i = 0; i < cec.Length; i++)
            {
                iByte[i] = Convert.ToByte(Convert.ToString(cec[i]));
            }

            return new Individuo(iByte);
        }
    }
}
